********************************************************************************
********************************************************************************
** Robustness analysis 12
** Keep only students from small primary schools to ensure they received the
** same primary school inputs.
********************************************************************************
********************************************************************************

** Load data
use "$dataraw_path\data_ftna_publication.dta", clear


eststo rob13_1: areg gpa_ftna_core_sd private female uncommon_name ///
	peers_score_core_sd peers_fail_share peers_as_share gpa_psle_other_sd ///
	if sample==1 & school_size_psle<=55, cl(school_id) a(group_id)

eststo rob13_2: areg gpa_ftna_core_sd private female uncommon_name ///
	peers_score_core_sd peers_fail_share peers_as_share gpa_psle_other_sd ///
	if sample==1 & school_size_psle<=40, cl(school_id) a(group_id)

* Output
esttab rob13_* using "$out_path\tableb10.tex", replace se ///
stats(N r2, fmt(%12.3gc) labels("\(N\)" "\(R^2\)")) compress nomtitles ///
starlevels("" 0.01) substitute(\_ _) b(3) ///
/*KEEP*/k(private female uncommon_name peers_score_core_sd ///
peers_fail_share peers_as_share gpa_psle_other_sd) ///
/*ORDER*/o(private female uncommon_name peers_score_core_sd ///
peers_fail_share peers_as_share gpa_psle_other_sd) ///
/*LABELS*/varl(private "\$Private_s$" female "\$Female$" ///
uncommon_name "\$\textit{Uncommon name}$" ///
peers_score_core_sd "\$\textit{Peers PSLE}_{s}$" ///
peers_fail_share "\$\textit{Peers failed}_{s}$" ///
peers_as_share "\$\textit{Peers with A}_{s}$" ///
gpa_psle_other_sd "\$\textit{GPA other}_{p} \textit{ (PSLE)}$")
